home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
EnigmA Amiga Run 1995 November
/
EnigmA AMIGA RUN 02 (1995)(G.R. Edizioni)(IT)[!][issue 1995-11][Skylink CD].iso
/
earcd
/
comm
/
erp.lha
/
ERP.doc
< prev
Wrap
Text File
|
1995-07-26
|
6KB
|
164 lines
EasyRequestPatch V1.0 by Chris Hodges
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Introduction
~~~~~~~~~~~~
A friend of mine once asked me, if I could write a little program for
his BBS that would cancel all the system-requesters that may appear,
as his harddisk brought up read/write errors which were not really
existant.
So this is my first attempt for such a patch. I thought somebody had
already invented a program like this, but none of the asked sysops
could help.
The patch will kill any requester that matches a pattern given in a
config file. Other requesters will not be harmed at all.
I tried to make this program as secure and efficient as possible, and
I think this program is.
Requirements
~~~~~~~~~~~~
EasyRequestPatch needs Kick 2.04 or higher.
Usage
~~~~~
Run >NIL: ERP >>logfile [configfile] [QUIT]
As you can see, the program does not unhook itself. The config file
must be specified if you install the patch, to remove the patch
again, ERP QUIT is sufficient. All normal cli output can be
redirected into a log file.
Configuration
~~~~~~~~~~~~~
An example configuration file has been included in the archive.
The configuration file is a normal AmigaDOS ascii-text. It may *NOT*
contain other line seperators than linefeeds (no CRs allowed!).
Empty lines and characters after a semicolon are ignored.
A configuration line looks like this:
pattern,(delay,gadgetnum,retries)
or
pattern,(delay,gadgetnum,retries),(delay,gadgetnum,retries),... etc.
The pattern string may contain any normal dos jokers. Use quotemarks
where required. After the pattern you have to enter at least one
group containing three defining values. You can define up to five
such groups. delay is used to specify the time to pass before ERP
answers the requester with the given gadget number. These delays
have to be entered in units of 1/50 secs.
This action will be repeated until the requester shuts up or the
number of retries has been overridden. If this happens, the next
group will be taken for the requester, or if it already has been the
last group, the requester will pop up as usually.
The gadgets in each requester are placed in ascending order from 1 to
N-1, whereas N represents the total amount of gadgets in the dialogue
box. The last gadget (often 'Cancel') is always gadget number 0.
There are few 'special' gadgetnumbers:
-1: Is used to behave as if an IDCMP event has occurred (often this
has the same result as clicking on the 'Retry' gadget.
-2: Just waits the amount of time you give with the delay
instruction.
-3: Flashes the display and beeps.
-4: Resets the computer after the given delay. Please note that this
delay should be at least 5 seconds (=250 VBLs), to ensure that
all disk activity has been stopped.
-5: Like -4, but kills the exec base to avoid a guru meditation on
bootup.
Note that the patterns are proccessed in that order they have been
entered into. There can be as many pattern definitions as you like.
Notes
~~~~~
Due to the dynamic linked lists used in this program, it could happen
that this program fragementates your memory. Therefore I use reversed
memory allocation to avoid little scattered memory blocks.
These linked lists are required to distinguish between different
requester coming from different tasks. As there is no possibility to
check whether a requester has been killed successfully (i.e the
program is satisfied with the result and does not opens the requester
again), the program reserves some memory to save some information
about the requester. If the same requester appears within two seconds
ERP acts according to the group behaviour. Otherwise the memory is
freed and the old requester will be forgotten.
History
~~~~~~~
V1.0 (26-Jul-95):
~~~~~~~~~~~~~~~~~
- The logfile was a little bit faulty due to the mixed usage of
buffered and non-buffered writing. This has been fixed now.
- Changed the main loop quantum from 1 VBL delay to 10 VBLs. This
will reduce the cpu usage.
- Changed the requester-timeout to two seconds instead of one.
- Modified the parser to check for more errors.
- Increased the general buffers a bit.
- Strange things seem to happen: The last program opening a
requester, will get the control-c signal passed through. No clue
why this happens and how to prevent it. Please use 'ERP Quit'
instead of the Ctrl-C key.
- Added the wait and reset events.
- Added the beep and hard reset events.
V1.0ß (25-Jul-95):
~~~~~~~~~~~~~~~~~~
- First release. Works quite well.
Copyright notice
~~~~~~~~~~~~~~~~
EasyRequestPatch (ERP) and it's documentation are Copyright © 1995
by Chris Hodges. All rights reserved.
Disclaimer
~~~~~~~~~~
EasyRequestPatch has proven to be stable in everyday use. The author
is not responsible for any loss of data, damages to software or
hardware that may result directly or indirectly from the use of this
program. The author reserves the right to make changes to the
software or documentation without notice.
Shareware note
~~~~~~~~~~~~~~
This program is shareware, this means that you can copy it freely as
long as you don't ask any more money for it than a nominal fee for
copying. If you want to distribute this program you must keep this
document with it. This program cannot be used for commercial purposes
without written permission from the author.
None of the files of the ERP package may be modified or left out
without permission of the author. Crunching or archiving is allowed
only if none of the ERP files get modified by it. Adding BBS adverts
or similar to such an archive is forbidden.
If you use this program regularily, the author would appreciate any
donation you could give him. Especially SysOps could register this
program, as they really may need ERP for his BBS.
Contact address
~~~~~~~~~~~~~~~
Any mails or donations to:
Chris Hodges Account: 359 68 63
Kennedystr. 8 BLZ : 700 530 70
D-82178 Puchheim Bank : Sparkasse Fürstenfeldbruck
Germany
Tel.: 089/8005856
Email: chris@sixpack.pfalz.org